Skip to content

Add Debian CRAN checks using official Docker container to GitHub Actions#72

Closed
Copilot wants to merge 6 commits intomainfrom
copilot/add-debian-to-github-actions
Closed

Add Debian CRAN checks using official Docker container to GitHub Actions#72
Copilot wants to merge 6 commits intomainfrom
copilot/add-debian-to-github-actions

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 23, 2026

Package fails on CRAN incoming checks for Debian. This adds a CI configuration to catch these issues pre-submission.

Changes

  • Created new debian-cran-check.yaml workflow file that uses the official Debian-based CRAN check environment Docker container (ghcr.io/r-devel/rcheckserver/debian:latest)
  • The workflow runs R CMD check --as-cran in the same Debian environment that CRAN uses for incoming checks
  • Installs package dependencies using remotes::install_deps()
  • Uses dynamic package name from ${GITHUB_REPOSITORY#*/} for reusability
  • Includes explicit permissions block (contents: read) for security
jobs:
  check-cran-debian:
    runs-on: ubuntu-latest
    permissions:
      contents: read
    container:
      image: ghcr.io/r-devel/rcheckserver/debian:latest

This approach provides more accurate replication of CRAN's Debian incoming checks compared to using --as-cran on a standard ubuntu-latest runner, as it uses the exact same container environment that CRAN uses.

Original prompt

This section details on the original issue you should resolve

<issue_title>Add Debian to GitHub Actions</issue_title>
<issue_description>The package fails on CRAN incoming checks on Debian.

Set up Debian with --as-cran on the GHA yml file.</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits January 23, 2026 10:41
Co-authored-by: osorensen <21175639+osorensen@users.noreply.github.com>
Co-authored-by: osorensen <21175639+osorensen@users.noreply.github.com>
Copilot AI changed the title [WIP] Add Debian setup to GitHub Actions configuration Add Debian --as-cran checks to GitHub Actions Jan 23, 2026
Copilot AI requested a review from osorensen January 23, 2026 10:45
@osorensen
Copy link
Copy Markdown
Owner

osorensen commented Jan 23, 2026

@copilot I think the approach in this file would be better?

on: [push, pull_request]

jobs:
  check-cran-debian:
    # Use an Ubuntu runner to manage the Docker container
    runs-on: ubuntu-latest
    container:
      # The official Debian-based CRAN check environment image
      image: ghcr.io/r-devel/rcheckserver/debian:latest
      # Set up an external volume or mount the workspace to access your package code
      # This example assumes the package is in the root of the repo
      volumes:
        - ${{ github.workspace }}:/workdir
      options: --workdir /workdir

    steps:
      - name: Checkout repository
        uses: actions/checkout@v4

      - name: Install package dependencies
        # The container has most system libraries pre-installed,
        # but R package dependencies still need to be installed.
        # This command installs dependencies listed in the DESCRIPTION file from CRAN.
        run: R -e 'install.packages(c("remotes", "rcmdcheck")); remotes::install_deps(cran = TRUE, dependencies = TRUE)'

      - name: Run R CMD check
        # Run the standard R CMD check command within the container environment
        run: R CMD check .

Copilot AI and others added 3 commits January 23, 2026 10:47
Co-authored-by: osorensen <21175639+osorensen@users.noreply.github.com>
Co-authored-by: osorensen <21175639+osorensen@users.noreply.github.com>
Co-authored-by: osorensen <21175639+osorensen@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Jan 23, 2026

@copilot I think the approach in this file would be better?

...

I've implemented your suggested approach using the official Debian CRAN Docker container. Changes in commits e4e060e, c6a15d6, and f1f2cbb:

  • Created new debian-cran-check.yaml workflow using ghcr.io/r-devel/rcheckserver/debian:latest
  • Reverted changes to the existing R-CMD-check.yaml file
  • Made the workflow reusable by using ${GITHUB_REPOSITORY#*/} instead of hardcoding the package name
  • Added explicit permissions block for security
  • Removed unused rcmdcheck package

The workflow now runs R CMD check with --as-cran in the same Debian environment that CRAN uses for incoming checks.

Copilot AI changed the title Add Debian --as-cran checks to GitHub Actions Add Debian CRAN checks using official Docker container to GitHub Actions Jan 23, 2026
@osorensen osorensen closed this Jan 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Debian to GitHub Actions

2 participants